home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Alles Voor Internet / Tout Pour Internet
/
alles voor internet.iso
/
MacInternet™
/
Telnet
/
NCSA
/
tn3270 2.3d26 source
/
tn3270
/
addshr.c
next >
Wrap
C/C++ Source or Header
|
1991-01-21
|
2KB
|
74 lines
/*
* tn3270 for the Macintosh Source Code
* Brown University Computing and Information Services
* Version 2.3d21, January 17, 1991
* Copyright (c) 1988, 1989, 1990, 1991 by Brown University and by
* Peter John DiCamillo.
*
* Permission is granted to any individual or institution to use, copy,
* or redistribute the binary version of this software and its
* documentation provided this notice and the copyright notices are
* retained. Permission is granted to any individual or non-profit
* institution to use, copy, modify, or redistribute the source files
* of this software provided this notice and the copyright notices are
* retained. This software may not be distributed for profit, either
* in original form or in derivative works, nor can the source be
* distributed to other than an individual or a non-profit institution.
* Any individual or group interested in seeing and/or using these
* source files but who are prevented from doing so by the above
* constraints should contact Don Wolfe, Assistant Vice-President for
* Computer Systems at Brown University, (401) 863-7250, for possible
* software licensing of the source developed at Brown.
*
* Brown University and Peter John DiCamillo make no representations
* about the suitability of this software for any purpose.
*
* BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
* EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
* INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#include <Files.h>
main(argc, argv)
int argc; char * argv[];
{
char vname[256];
char fname[256];
short vnum;
OSErr rc;
FInfo fndinfo;
if (argc != 2) {
printf("Format: addshr filename\n");
return;
}
strcpy(fname, argv[1]);
/* get volume number for default volume */
rc = GetVol(vname, &vnum);
if (rc != 0) {
printf("Error %d from GetVol\n", rc);
return;
}
rc = GetFInfo(fname, vnum, &fndinfo);
if (rc != 0) {
printf("Error %d from GetFInfo\n", rc);
return;
}
fndinfo.fdFlags |= 0x40; /* set shared bit */
rc = SetFInfo(fname, vnum, &fndinfo);
if (rc != 0) {
printf("Error &d from SetFInfo\n", rc);
return;
}
}